#include <iostream>
#include <string>
#include "btree.hpp"
#include "node.hpp"
using namespace std;
using node = struct node;

int main()
{
    // node *ptr = new node(100);
    // delete ptr;

    Tree *pt = new Tree();
    pt->add(3);
    pt->add(1);
    pt->add(2);
    pt->add(3);
    pt->add(6);
    pt->add(8);
    pt->add(0);
    pt->add(5);
    pt->del(3);

    pt->preOrder_r(pt->getRoot());
    cout << endl;
    pt->preOrder();
    cout << endl;

    pt->inOrder_r(pt->getRoot());
    cout << endl;
    pt->inOrder();
    cout << endl;

    pt->postOrder_r(pt->getRoot());
    cout << endl;
    pt->postOrder();
    cout << endl;

    pt->levelOrder();
    cout << endl;

    delete pt;

    system("pause");

    return 0;
}